@import "./layout.scss";
@import "./element.plus.system.override.scss";
@import "./element.plus.customized.scss";
@import "./element.plus.customized.dark.scss";
@import "./element.plus.override.scss";
@import "./app.scss";

// 全局样式
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-thumb {
  background-color: #ddd;
  background-clip: padding-box;
  min-height: 28px;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: #bbb;
}
::-webkit-scrollbar-track {
  background-color: transparent;
}
input[type="search"] { appearance: none; }
input::-webkit-search-cancel-button { display: none; }
:root {
  --g-box-shadow-color: rgb(0 0 0 / 12%);
  &.dark {
    --g-box-shadow-color: rgb(0 0 0 / 72%);
  }
  @include set-themes-css-var();
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background-color: var(--g-app-bg);
  transition: background-color 0.3s;
  box-sizing: border-box;
  font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
  font-size: $--font-size;
  &.hidden {
    overflow: hidden;
  }
}
* {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  //设置滚动条的颜色，针对所有浏览器
  //顺序为 滚轮颜色  轨道颜色
  scrollbar-color: #ddd transparent;
}

// 右侧内容区针对fixed元素，有横向铺满的需求，可在fixed元素上设置 [data-fixed-calc-width]
[data-fixed-calc-width] {
  position: fixed;
  left: 50%;
  right: 0;
}
[data-app-width-mode="adaption"],
[data-app-width-mode="adaption-min-width"] {
  [data-fixed-calc-width] {
    width: calc(100% - var(--g-main-sidebar-actual-width) - var(--g-sub-sidebar-actual-width));
    transform: translateX(-50%) translateX(calc(var(--g-main-sidebar-actual-width) / 2)) translateX(calc(var(--g-sub-sidebar-actual-width) / 2));
  }
}
[data-app-width-mode="center"],
[data-app-width-mode="center-max-width"] {
  [data-fixed-calc-width] {
    width: calc(var(--g-app-width) - var(--g-main-sidebar-actual-width) - var(--g-sub-sidebar-actual-width));
    transform: translateX(-50%) translateX(calc(var(--g-main-sidebar-actual-width) / 2)) translateX(calc(var(--g-sub-sidebar-actual-width) / 2));
  }
  @media screen and (max-width: $g-app-width) {
    [data-fixed-calc-width] {
      width: calc(100% - var(--g-main-sidebar-actual-width) - var(--g-sub-sidebar-actual-width));
      transform: translateX(-50%) translateX(calc(var(--g-main-sidebar-actual-width) / 2)) translateX(calc(var(--g-sub-sidebar-actual-width) / 2));
    }
  }
}
[data-mode="mobile"] {
  [data-fixed-calc-width] {
    width: 100% !important;
    transform: translateX(-50%) !important;
  }
}
.full-container {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  .page-main {
    flex: 1;
    // margin: 20px 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .btn-wrapper {
    height: 100%;
    margin-right: 10px;
    display: flex;
    align-items: center;
    font-size: 12px;
    .icon {
      margin-right: 5px;
    }
  }
}
.section-column {
  display: flex;
  flex-direction: column;
  overflow: auto;
  flex: 1;
  height: 100%;
}

// textarea 字体跟随系统
textarea {
  font-family: inherit;
}

// 列表页全局样式
.el-table.list-table {
  margin: 20px 0;
  .el-button + .el-dropdown {
    margin-left: 10px;
  }
}
.block {
  background: $--color-whites;
  padding: 16px 20px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
// el-tooptip 宽度
.tooptip-width {
  max-width: 40% !important;
}
// 合同生命周期Drawer
.drawer-wrapper {
  width: 460px !important;
  .el-drawer__header {
    margin-bottom: 0;
    background-color: #f5f7fa;
  }
  .el-drawer__close-btn {
    margin-bottom: 20px;
  }
  .el-timeline-item__node--normal {
    left: 91px;
    top: 15px;
    width: 6px;
    height: 6px;
  }
  .el-timeline-item__tail {
    left: 94px;
    top: 15px;
    border-left: 1px dotted #e4e4e4;
  }
  .el-timeline-item__wrapper {
    padding-left: 0;
  }
}
